package com.cai.controller;

import com.cai.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author czq
 * @Package com.cai.controller
 * @Date 2024/5/20 13:34
 * @description:
 */
@RestController
@RequestMapping("order")
public class TestController {
    @Resource
    private OrderService orderService;
    @GetMapping("/pay")
    public String orderStatusChange(){
        orderService.create();

        orderService.pay(1L);
        orderService.deliver(1L);
        orderService.receive(1L);

        System.out.println("订单状态："+orderService.getOrders());
        return "success";
    }
}
